home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
text
/
xes.lha
/
XES
/
REXX
/
InsLit.xdme
< prev
next >
Wrap
Text File
|
1995-08-01
|
2KB
|
85 lines
/* $VER: InsLit.xdme 1.0 (01 Aug 1995) */
/* Copyright © 1992-5 Fergus Duniho */
/* Requester for picking and inserting any character */
IF ~Show("L","rexxarplib.library") THEN
IF ~Addlib("rexxarplib.library",0,-30,0) THEN EXIT
OPTIONS RESULTS
ADDRESS 'XDME.1'
'rxresult $txtfontname'
Font = result
'rxresult $txtfontsize'
Size = result
H = Size+4
IF Size=9 THEN W = 20
ELSE W = 16
ADDRESS AREXX "'Call CreateHost CPORT, NOTPORT'"
DO UNTIL Showlist(P,CPORT)
CALL Delay(10)
END
IDCMP = 'CLOSEWINDOW+WINDOWDRAG+MOUSEBUTTONS'
FLAGS = 'ACTIVATE+WINDOWCLOSE+WINDOWDRAG'
CALL OpenWindow CPORT, 70, 50, 1+W*28, 10+8*H, IDCMP, FLAGS, 'Pick a Character'
CALL ModifyHost CPORT, CLOSEWINDOW, 'Call Quit CPORT; Exit'
CALL ModifyHost CPORT, MOUSEBUTTONS, 'X = %x; Y = %y; Call ReadHost CPORT, MAINPORT, "X = %x; Y = %y; Call Insert()"'
CALL SetAPen CPORT, 1
CALL SetFont CPORT, FONT, SIZE
CALL Move CPORT, 4, 6+H
CALL Text CPORT, " ! "" # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ;"
CALL Move CPORT, 4, 6+2*H
CALL Text CPORT, "< = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W"
CALL Move CPORT, 4, 6+3*H
CALL Text CPORT, "X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s"
CALL Move CPORT, 4, 6+4*H
CALL Text CPORT, "t u v w x y z { | } ~ "
CALL Move CPORT, 4, 6+5*H
CALL Text CPORT, " ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª «"
CALL Move CPORT, 4, 6+6*H
CALL Text CPORT, "¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç"
CALL Move CPORT, 4, 6+7*H
CALL Text CPORT, "È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã"
CALL Move CPORT, 4, 6+8*H
CALL Text CPORT, "ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ"
CALL SetAPen CPORT, 3
DO Y = 10+H TO 10+7*H BY H
CALL Move CPORT, 0, Y
CALL Draw CPORT, 28*W, Y
END
DO X = W TO 27*W BY W
CALL Move CPORT, X, 10
CALL Draw CPORT, X, 20+8*H
END
CALL OpenPort MAINPORT
DO UNTIL ShowList(P, MAINPORT)
CALL Delay(10)
END
CALL SetNotify(CPORT, CLOSEWINDOW, MAINPORT)
CALL SetNotify(CPORT, MOUSEBUTTONS, MAINPORT)
DO FOREVER
CALL WaitPkt(MAINPORT)
Packet = GetPkt(MAINPORT)
IF Packet ~== Null() THEN DO
ID = GetArg(PACKET, 0)
CALL Reply PACKET, 0
INTERPRET ID
END
END
Insert:
Call Quit CPORT
CH = d2c(((Y-10)%H)*28+X%W+32)
C = "'" || CH
C
C = "set ch" CH
C
EXIT